package com.ftwj.service;

import com.ftwj.entity.SchoolRoomSeatInfo;
import com.ftwj.mapper.SeatMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SeatService {
    @Autowired
    private SeatMapper seatMapper;

    /**
     * 根据教室ID获取座位。
     *
     * @param roomId 教室ID
     * @return 该教室下的所有座位列表。
     */
    public List<SchoolRoomSeatInfo> getSeatsByRoomId(String roomId) {
        return seatMapper.findByRoomId(roomId);
    }
}
